package com.purong.purong.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by Administrator on 2016/7/11.
 */
public class LoanPageAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> list;
    private ArrayList<String> titleList;
    public LoanPageAdapter(FragmentManager fm, ArrayList<Fragment> fragmentList) {
        super(fm);
        this.list=fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titleList.get(position);
    }
    public void setPageTitle(ArrayList<String> titleList){
        this.titleList=titleList;
    }
}
